<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用*号打印直角三角形</title>
</head>
<body>


<script>

    for (var i = 1 ; i <= 5 ; i++){

        for(var a = 1 ; a <= i ; a++){
            document.write("*")
        }
        document.write("<br>");

    }

</script>




</body>
</html>